<!--核对组件---3.核对-->
    <div nz-col  [nzSpan]="24" class="mb-md">
                <!--核对状态是否显示--- 未核对-->
                <div *ngIf='checkStatus == true' nz-form-item class="d-flex">
                 <button nz-col [nzSpan]="5" [nzOffset]="2"   nz-button [nzType]="'default'"  (click)="sonmergeClick(0)">
                    <span>暂缓核对</span>
                </button>
                   <button nz-col [nzSpan]="5" [nzOffset]="2"  nz-button [nzType]="'danger'"  (click)="sonmergeClick(1)">
                    <span>作废核对</span>
                </button>
                  <button nz-col [nzSpan]="5" [nzOffset]="2"  nz-button [nzType]="'primary'"  (click)="sonmergeClick(2)">
                    <span>完成核对</span>
                </button>
                <!--核对状态是否显示--- 已核对-->
                </div>
                    <div *ngIf='checkStatus == false'  nz-form-item class="d-flex">
                    <span style="text-align:center;width:100%"><i  style="font-size: 1.8rem" class="anticon anticon-{{title == '核对完成' ? 'check' : 'close'}}-circle"  [ngClass]="title == '核对完成' ? 'pic' : 'picclose'" ></i><span style="font-size: 1.8rem;margin-left: 1rem;">{{title}}</span></span>
                </div>
        </div>

    <div  nz-col [nzSpan]="24"  class="contentDiv" >
         
            <h2 class="work">合并代码异常清单</h2>
            <nz-table #nzTable 
            [nzLoading]="checkloading" 
             [nzAjaxData]="mergeListData"
           
            [nzTotal]="YpageTotal"
            nzIsPagination="true"
            (nzPageIndexChange)="pageChange($event)"
            [nzPageIndex]='YpageIndex'
            nzPageSize="10"
            nzShowTotal='true'
            nzShowQuickJumper = 'true'
            >
               
                <thead nz-thead>
                
                    <tr>
                    <th nz-th><span>代码</span></th>
                    <th nz-th ><span>名称</span></th>
                    <th nz-th><span>路径</span></th>
                   <th nz-th><span>类型</span></th>
                    <!--<th nz-th><span>部署于</span></th>-->
                    <th nz-th ><span>提交状态</span></th>
                    <th nz-th><span>确认状态</span></th>
                    <th nz-th ><span>描述</span></th>
                    <th nz-th *ngIf='checkStatus == true'><span>操作</span></th>
                    </tr>
                </thead>
                <tbody nz-tbody>
                    <tr nz-tbody-tr  *ngFor="let j of mergeListData;let l = index">
                    <td nz-td>{{j.partOfProject }}</td>
                    <td nz-td title="{{j.programName}}">{{j.programNamestr }}</td>
                        <td nz-td title="{{j.fullPath}}">{{j.fullPathstr }}</td>
                    <td nz-td>{{j.patchType }}</td>
                        <!--<td nz-td>{{j.deployWhere }}</td>-->
                    <td nz-td>{{j.commitType }}</td>
                        <td nz-td *ngIf="j.confirmStatus == '删除'"  style="color:red">{{j.confirmStatus }}</td>
                           <td nz-td *ngIf="j.confirmStatus != '删除'" [ngClass]="j.confirmStatus === '加入投放' ? 'picbtn' : ''">{{j.confirmStatus }}</td>
                        <td nz-td >{{j.errorType }}</td>
                    <td nz-td *ngIf='checkStatus == true'>
                      <span  style="color:red;margin-right:0.5rem;text-align:center;padding:0.3rem;"  [ngClass]="j.checkbuttons === false? 'delactive' : ''"  (click)="sonbuttonClick(3,j,l)" >
                             删除
                        </span>
                        <span style=" text-align:center;color:#108ee9;padding:0.3rem;"  [ngClass]="j.checkbuttons === true ? 'noactive' : ''"  (click)="sonbuttonClick(4,j,l)">
                        加入投放
                        </span>
                        <!--<span *ngIf='j.check == true'>已投放</span>-->
                    </td>
                    </tr>
                </tbody>
                </nz-table>

         
                
        </div>
  
            <div nz-col [nzSpan]="24" class="mb-md">
                <div  nz-form-item class="d-flex work">
                    <div  nz-col [nzSpan]="3">
                        <h2>选择工作项：</h2>
                    </div>
                    <div nz-col [nzSpan]="21">
                     

                             <nz-dropdown >
                            <button nz-button nz-dropdown [disabled]='isWorkitem.disable' ><span>{{isWorkitem.title}}</span> <i class="anticon anticon-down"></i></button>
                            <ul nz-menu class="dropdown">
                            <li nz-menu-item *ngFor="let option of initOptions"  (click)="sonSelected(option)" >
                               <i class="anticon" [ngStyle]="{'color':option.color}" [ngClass]="option.icon"></i> {{option.label}}
                            </li>
                         
                            </ul>
                        </nz-dropdown>
                    </div>
              
                        
                </div>
                 <div  nz-form-item class="d-flex">
                
                    <div nz-col [nzSpan]="24" style="text-align:center"> 
                        <nz-spin [nzSpinning]="isSpinning" [nzTip]="'正在读取数据...'"></nz-spin>
                    </div>
                        
                </div>
            
            </div>
           
        <div nz-row [nzType]="'flex'" [nzJustify]="'start'" class="contentDiv" nz-col [nzSpan]="24" *ngIf="isNow == true" >
                 
                <div nz-col [nzSpan]="24" class="mb-md">
                <div  nz-form-item class="d-flex work">
                    <h2>{{nowData.label}}</h2>
              <span  [ngStyle]="{'color':nowData.color,'margin-left':'1rem','margin-top':'0.4rem'}" > <i class="anticon" [ngStyle]="{'color':nowData.color}" [ngClass]="nowData.icon"></i>&nbsp;{{nowData.deliveryResult}}</span>
                </div>
            </div>
            <div nz-col [nzSpan]="6" class="mb-md">
                <div  nz-form-item class="d-flex">
                    <div class="ad-desc-list__term ng-star-inserted words">投放计划 :</div>
                    <div class="ad-desc-list__detail ng-star-inserted">{{nowData.deliveryTime | date:'yyyy-MM-dd'}}</div>
                </div>
            </div>
            <div nz-col [nzSpan]="6" class="mb-md">
                <div   nz-form-item class="d-flex">
                    <div class="ad-desc-list__term ng-star-inserted">{{nowData.profiles}}</div>
                    <!--<div class="ad-desc-list__detail ng-star-inserted">{{j.delivery.applyAlias}}</div>-->
                </div>
            </div>

            <div nz-col [nzSpan]="24" class="mb-md">
                <div  nz-form-item class="d-flex">
                    <div class="ad-desc-list__term ng-star-inserted words">工作项 :</div>
                    <div class="ad-desc-list__detail ng-star-inserted">{{nowData.label}}</div>
                </div>
            </div>


            <div nz-col [nzSpan]="24" class="mb-md">
                <div  nz-form-item class="d-flex">
                    <div class="ad-desc-list__term ng-star-inserted words">申请人 :</div>
                    <div class="ad-desc-list__detail ng-star-inserted">{{nowData.proposer}}</div>
                </div>
            </div>
             <!--<div nz-col [nzSpan]="12" class="mb-md">
                <div  nz-form-item class="d-flex">
                    <div class="ad-desc-list__term ng-star-inserted words">状态 :</div>
                    <div class="ad-desc-list__detail ng-star-inserted">{{j.delivery.deliveryResult}}</div>
                </div>
            </div>-->

            <div  nz-col [nzSpan]="24" *ngFor="let s of checkModalData ; let l = index" style="margin-bottom:0px;">
                    <div>
                        <nz-table #nzTables    *ngFor="let k of s.deliveryPatchDetails" nzBordered  [nzIsPagination]="false" [nzDataSource]="s.deliveryPatchDetails">
                            <tbody nz-tbody nz-col [nzSpan]="24"  style="margin-bottom:20px;">
                            <tr  nz-tbody-tr nz-col [nzSpan]="24">
                                <td class="bcolor" nz-td nz-col [nzSpan]="8">工程名</td>
                                <td nz-td nz-col [nzSpan]="16">{{s.projectName}}</td>
                            </tr>

                            <tr nz-tbody-tr nz-col [nzSpan]="24">
                                <td class="bcolor"  nz-td nz-col [nzSpan]="8">编译为</td>
                                <td nz-td nz-col [nzSpan]="16">{{k.patchType}}</td>
                            </tr>
                            <tr  nz-tbody-tr nz-col [nzSpan]="24">
                                <td class="bcolor"  nz-td nz-col [nzSpan]="8">部署到</td>
                                <td nz-td nz-col [nzSpan]="16">{{k.deployWhere}}</td>
                            </tr>
                            <tr nz-tbody-tr nz-col [nzSpan]="24">
                                <td class="bcolor"  nz-td nz-col [nzSpan]="8">代码</td>
                                <td class="bcolor"  nz-td nz-col [nzSpan]="4" >变动类型</td>
                                <td class="bcolor"  nz-td nz-col [nzSpan]="checkStatus == true ? '4' : '6'">描述</td>
                                 <td class="bcolor"  nz-td nz-col [nzSpan]="checkStatus == true ? '4' : '6'">状态</td>
                                <td class="bcolor"*ngIf='checkStatus == true'  nz-td nz-col [nzSpan]="4">操作</td>
                            </tr>
                            <tr nz-tbody-tr nz-col [nzSpan]="24"  *ngFor="let x of k.fileList;let q = index">
                                <td nz-td nz-col [nzSpan]="8"  title="{{x.fullPath}}">{{x.fullPathstr}}</td>
                                <td nz-td nz-col [nzSpan]="4">{{x.commitType}}</td>
                                <td nz-td nz-col [nzSpan]="checkStatus == true ? '4' : '6'" >{{x.errorType}}</td>
                                <td nz-td nz-col [nzSpan]="checkStatus == true ? '4' : '6'" *ngIf="x.confirmStatus == '不投放'" [ngClass]="'picclose'">{{x.confirmStatus}}</td>
                                <td nz-td nz-col [nzSpan]="checkStatus == true ? '4' : '6'" *ngIf="x.confirmStatus != '不投放'" [ngClass]="x.confirmStatus == '已合并' ? 'picbtn' : ''">{{x.confirmStatus}}</td>
                                <td nz-td nz-col [nzSpan]="4" *ngIf='checkStatus == true'>
                                   <a  style="color:#108ee9;"  [ngClass]="x.buttons == true ? 'noactive' : ''"  (click)="sonbuttonClick(1,x,q)">已合并&nbsp;</a>&nbsp;
                                   <a style="color:red;" [ngClass]="x.buttons == false ? 'active' : ''"   (click)="sonbuttonClick(2,x,q)">不投放&nbsp;</a>&nbsp;
                                </td>
                            </tr>
                            </tbody>
                        </nz-table>
                    </div>
            </div>

                <div  nz-col [nzSpan]="24" class="mb-md" *ngIf='checkStatus == true'>
                        <button  nz-col [nzSpan]="4"    [nzOffset]="'6'" nz-button  (click)="sonreturnsclick(0,nowData)" [disabled]="nowData.disabledS" [nzType]="'primary'" [nzSize]="'large'">
                            <span>打回</span>
                        </button>

                        <button   nz-col  [nzSpan]="4" [nzLoading]="nowData.checkingloading" [disabled]="nowData.disabledS"   [nzOffset]="'3'" nz-button  (click)="sonreturnsclick(1,nowData)"  [nzType]="'primary'" [nzSize]="'large'">
                            <span>成功</span>
                        </button>
                </div>
            </div>

            <nz-modal [nzVisible]="istextVisible"  [nzWidth]="600" [nzTitle]="'请输入打回理由（选填）'"   [nzContent]="modaltextTitle"
                (nzOnCancel)="istextVisible=false"  (nzOnOk)="sonreturnsclick(2,returnID)" nzZIndex=1000>
                <ng-template #modaltextTitle>
                    <textarea rows="6"  nz-input [(ngModel)]="inputValue"  ></textarea>
                </ng-template>
        </nz-modal>

    <nz-modal [nzVisible]="iStouchan"   [nzWidth]="1024" [nzTitle]="'工作项投放申请'" nzZIndex=1000  [nzContent]="detailVisibleModalModal"
          (nzOnCancel)="iStouchancanle()" (nzOnOk)="soncheckSave()">
    <ng-template #detailVisibleModalModal>

          <form nz-form  [nzLayout]="'inline'">
            <div nz-row [nzGutter]="24">

                <div  nz-col [nzSpan]="20" [nzOffset]="2" class="mb-md">
                    <div nz-form-item class="d-flex">
                        <div nz-form-label ><label for="status">投放申请</label></div>
                        <div nz-form-control class="flex-1">
                           <nz-select style="width:100%;" [(ngModel)]="guidDelivery"  name="guidDelivery" nzId="guidDelivery" [nzPlaceHolder]="'请选择工作项'" [nzShowSearch]="true" [nzSize]="'large'">
                            <nz-option *ngFor="let i of initOptions; let idx = index" [nzDisabled]="i.disable" [nzLabel]="i.label" [nzValue]="i.value"></nz-option>
                        </nz-select>
                        </div>
                    </div>
                </div>
        <div nz-col [nzSpan]="18" [nzOffset]="4" class="divContent" *ngFor="let x of addPatchType;let id = index">
         
             <div nz-col [nzSpan]="12" >

                        <div  class="d-flex" >
                            <label nz-checkbox [nzDisabled]="x.disabled"  [ngModelOptions]="{standalone: true}"  [ngModel]="x.checked" (ngModelChange)="soncheckbox($event,x)">
                            <span> 导出为：&nbsp; &nbsp;{{x.exportType}}</span>
                            </label>
                           
                        </div>
                    </div>
                    <div nz-col [nzSpan]="12" >
                    
                        <div nz-col [nzSpan]="24"  *ngFor="let s of x.children; let idx = index" style="margin-bottom:10px;" >
                            
                             <div  class="d-flex" >
                         
                             <label nz-checkbox    [ngModelOptions]="{standalone: true}" [nzDisabled]="s.disabled" [ngModel]="s.checked"  (ngModelChange)="soncheckboxChild($event,s,x)" >
                              <span> 部署到：&nbsp; &nbsp;{{s.name}}</span>
                        </label>
                        </div>
                              
                        </div>
                    </div>
        </div>
            </div>

        </form>
    </ng-template>
</nz-modal>
